package com.qf.job;

import org.quartz.*;

import java.util.Date;

/**
 * 自定义的工作实现的类
 * @author lixu
 */
public class MyJob2 implements Job {



    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        Scheduler scheduler = jobExecutionContext.getScheduler();
        try {
            System.out.println("MyJob2==Spring整合Quartz:时间:" + new Date() + "::" + scheduler.getSchedulerName());
        } catch (SchedulerException e) {
            throw new RuntimeException(e);
        }


    }
}
